Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Latest commit

 

History

History
19 lines (13 loc) · 553 Bytes

13.10 - swoole_event_dispatch.md

File metadata and controls

19 lines (13 loc) · 553 Bytes

swoole_event_dispatch

仅执行一次reactor->wait操作,在Linux平台下相当手工调用一次epoll_wait。与swoole_event_wait不同的是,swoole_event_wait在底层内部维持了循环。

void swoole_event_dispatch(void);

此函数的目的是兼容一些框架,如amp,它在框架内部自行控制reactor的循环,而使用swoole_event_waitswoole底层维持了控制权,就无法让出给框架方。

while(true)
{
	swoole_event_dispatch();
}

需要2.1.2/1.10.3或更高版本